Conversation
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
prettier
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 129 to 130 in 8ae3bdd
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 133 to 134 in 8ae3bdd
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 165 to 166 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 235 to 236 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 313 to 314 in 8ae3bdd
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 317 to 318 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 332 to 333 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 351 to 353 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 379 to 380 in 8ae3bdd
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 388 to 389 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 419 to 421 in 8ae3bdd
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 425 to 426 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 433 to 434 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 439 to 440 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 465 to 467 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 476 to 478 in 8ae3bdd
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
[prettier] reported by reviewdog 🐶
| "plugins": [ | ||
| "@typescript-eslint" | ||
| ], | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended" | ||
| ], |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| "plugins": [ | |
| "@typescript-eslint" | |
| ], | |
| "extends": [ | |
| "eslint:recommended", | |
| "plugin:@typescript-eslint/recommended" | |
| ], | |
| "plugins": ["@typescript-eslint"], | |
| "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], |
|
|
||
| module.exports = defineConfig({ | ||
| export default defineConfig({ | ||
| testDir: './tests', |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| testDir: './tests', | |
| testDir: "./tests", |
| "failedTests": [ | ||
| "849da1cee0c412ce5534-4ebb083191c59dda5f31" | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| "failedTests": [ | |
| "849da1cee0c412ce5534-4ebb083191c59dda5f31" | |
| ] | |
| } | |
| "failedTests": ["849da1cee0c412ce5534-4ebb083191c59dda5f31"] | |
| } |
| ```yaml | ||
| - text: This is just a demo of TodoMVC for testing, not the | ||
| - link "real TodoMVC app.": | ||
| - /url: https://todomvc.com/ |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| - /url: https://todomvc.com/ | |
| - /url: https://todomvc.com/ |
| - listitem: | ||
| - checkbox "Toggle Todo" | ||
| - text: feed the cat | ||
| - listitem: | ||
| - checkbox "Toggle Todo" | ||
| - text: book a doctors appointment |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| - listitem: | |
| - checkbox "Toggle Todo" | |
| - text: feed the cat | |
| - listitem: | |
| - checkbox "Toggle Todo" | |
| - text: book a doctors appointment | |
| - listitem: | |
| - checkbox "Toggle Todo" | |
| - text: feed the cat | |
| - listitem: | |
| - checkbox "Toggle Todo" | |
| - text: book a doctors appointment |
| - listitem: | ||
| - link "All": | ||
| - /url: "#/" | ||
| - listitem: | ||
| - link "Active": | ||
| - /url: "#/active" | ||
| - listitem: | ||
| - link "Completed": | ||
| - /url: "#/completed" |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| - listitem: | |
| - link "All": | |
| - /url: "#/" | |
| - listitem: | |
| - link "Active": | |
| - /url: "#/active" | |
| - listitem: | |
| - link "Completed": | |
| - /url: "#/completed" | |
| - listitem: | |
| - link "All": | |
| - /url: "#/" | |
| - listitem: | |
| - link "Active": | |
| - /url: "#/active" | |
| - listitem: | |
| - link "Completed": | |
| - /url: "#/completed" |
| - paragraph: Double-click to edit a todo | ||
| - paragraph: | ||
| - text: Created by | ||
| - link "Remo H. Jansen": | ||
| - /url: http://github.com/remojansen/ | ||
| - paragraph: | ||
| - text: Part of | ||
| - link "TodoMVC": | ||
| - /url: http://todomvc.com | ||
| ``` No newline at end of file |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| - paragraph: Double-click to edit a todo | |
| - paragraph: | |
| - text: Created by | |
| - link "Remo H. Jansen": | |
| - /url: http://github.com/remojansen/ | |
| - paragraph: | |
| - text: Part of | |
| - link "TodoMVC": | |
| - /url: http://todomvc.com | |
| ``` | |
| - paragraph: Double-click to edit a todo | |
| - paragraph: | |
| - text: Created by | |
| - link "Remo H. Jansen": | |
| - /url: http://github.com/remojansen/ | |
| - paragraph: | |
| - text: Part of | |
| - link "TodoMVC": | |
| - /url: http://todomvc.com | |
| ``` |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
| import { test, expect } from '@playwright/test'; | ||
|
|
||
| test.beforeEach(async ({ page }) => { | ||
| await page.goto('https://demo.playwright.dev/todomvc'); | ||
| }); | ||
|
|
||
| const TODO_ITEMS = [ | ||
| 'buy some cheese', | ||
| 'feed the cat', | ||
| 'book a doctors appointment' | ||
| ] as const; | ||
|
|
||
| test.describe('New Todo', () => { | ||
| test('should allow me to add todo items', async ({ page }) => { | ||
| // create a new todo locator | ||
| const newTodo = page.getByPlaceholder('What needs to be done?'); | ||
|
|
||
| // Create 1st todo. | ||
| await newTodo.fill(TODO_ITEMS[0]); | ||
| await newTodo.press('Enter'); | ||
|
|
||
| // Make sure the list only has one todo item. | ||
| await expect(page.getByTestId('todo-title')).toHaveText([ | ||
| TODO_ITEMS[0] | ||
| ]); | ||
|
|
||
| // Create 2nd todo. | ||
| await newTodo.fill(TODO_ITEMS[1]); | ||
| await newTodo.press('Enter'); | ||
|
|
||
| // Make sure the list now has two todo items. | ||
| await expect(page.getByTestId('todo-title')).toHaveText([ | ||
| TODO_ITEMS[0], | ||
| TODO_ITEMS[1] | ||
| ]); | ||
|
|
||
| await checkNumberOfTodosInLocalStorage(page, 2); | ||
| }); | ||
|
|
||
| test('should clear text input field when an item is added', async ({ page }) => { | ||
| // create a new todo locator | ||
| const newTodo = page.getByPlaceholder('What needs to be done?'); | ||
|
|
||
| // Create one todo item. | ||
| await newTodo.fill(TODO_ITEMS[0]); | ||
| await newTodo.press('Enter'); | ||
|
|
||
| // Check that input is empty. | ||
| await expect(newTodo).toBeEmpty(); | ||
| await checkNumberOfTodosInLocalStorage(page, 1); | ||
| }); | ||
| test.describe('Todo App Visual Tests', () => { |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| import { test, expect } from '@playwright/test'; | |
| test.beforeEach(async ({ page }) => { | |
| await page.goto('https://demo.playwright.dev/todomvc'); | |
| }); | |
| const TODO_ITEMS = [ | |
| 'buy some cheese', | |
| 'feed the cat', | |
| 'book a doctors appointment' | |
| ] as const; | |
| test.describe('New Todo', () => { | |
| test('should allow me to add todo items', async ({ page }) => { | |
| // create a new todo locator | |
| const newTodo = page.getByPlaceholder('What needs to be done?'); | |
| // Create 1st todo. | |
| await newTodo.fill(TODO_ITEMS[0]); | |
| await newTodo.press('Enter'); | |
| // Make sure the list only has one todo item. | |
| await expect(page.getByTestId('todo-title')).toHaveText([ | |
| TODO_ITEMS[0] | |
| ]); | |
| // Create 2nd todo. | |
| await newTodo.fill(TODO_ITEMS[1]); | |
| await newTodo.press('Enter'); | |
| // Make sure the list now has two todo items. | |
| await expect(page.getByTestId('todo-title')).toHaveText([ | |
| TODO_ITEMS[0], | |
| TODO_ITEMS[1] | |
| ]); | |
| await checkNumberOfTodosInLocalStorage(page, 2); | |
| }); | |
| test('should clear text input field when an item is added', async ({ page }) => { | |
| // create a new todo locator | |
| const newTodo = page.getByPlaceholder('What needs to be done?'); | |
| // Create one todo item. | |
| await newTodo.fill(TODO_ITEMS[0]); | |
| await newTodo.press('Enter'); | |
| // Check that input is empty. | |
| await expect(newTodo).toBeEmpty(); | |
| await checkNumberOfTodosInLocalStorage(page, 1); | |
| }); | |
| test.describe('Todo App Visual Tests', () => { | |
| import { test, expect } from "@playwright/test"; |
|
|
||
| test.describe('Mark all as completed', () => { | ||
| test.beforeEach(async ({ page }) => { | ||
| await createDefaultTodos(page); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test.beforeEach(async ({ page }) => { | |
| test.describe("Todo App Visual Tests", () => { | |
| test.beforeEach(async ({ page }) => { |
| await checkNumberOfTodosInLocalStorage(page, 3); | ||
| // Navigate to the ToDo app URL before each test | ||
| await page.goto('https://demo.playwright.dev/todomvc'); | ||
| }); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.goto('https://demo.playwright.dev/todomvc'); | |
| await page.goto("https://demo.playwright.dev/todomvc"); |
| test.afterEach(async ({ page }) => { | ||
| await checkNumberOfTodosInLocalStorage(page, 3); | ||
| test('should display the initial empty state correctly', async ({ page }) => { | ||
| // Assert that the page title is correct |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test('should display the initial empty state correctly', async ({ page }) => { | |
| test("should display the initial empty state correctly", async ({ page }) => { |
| await expect(page).toHaveTitle(/TodoMVC/); | ||
| // ⭐ Visual Regression: Check the entire page's initial empty state | ||
| await expect(page).toHaveScreenshot('initial-empty-state.png'); | ||
| }); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await expect(page).toHaveScreenshot('initial-empty-state.png'); | |
| await expect(page).toHaveScreenshot("initial-empty-state.png"); |
| await page.locator('.new-todo').press('Enter'); | ||
| await page.locator('.new-todo').fill('Item 2'); | ||
| await page.locator('.new-todo').press('Enter'); | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.locator('.new-todo').fill('Item 1'); | |
| await page.locator('.new-todo').press('Enter'); | |
| await page.locator('.new-todo').fill('Item 2'); | |
| await page.locator('.new-todo').press('Enter'); | |
| await page.locator(".new-todo").fill("Item 1"); | |
| await page.locator(".new-todo").press("Enter"); | |
| await page.locator(".new-todo").fill("Item 2"); | |
| await page.locator(".new-todo").press("Enter"); |
| await page.locator('.toggle').last().check(); | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.locator('.toggle').first().check(); | |
| await page.locator('.toggle').last().check(); | |
| await page.locator(".toggle").first().check(); | |
| await page.locator(".toggle").last().check(); |
| await expect(secondTodo).toHaveClass('completed'); | ||
| // Clear completed | ||
| await page.locator('.clear-completed').click(); | ||
| // ⭐ Visual Regression: Check state after clearing completed items |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.locator('.clear-completed').click(); | |
| await page.locator(".clear-completed").click(); |
| await page.locator('.clear-completed').click(); | ||
| // ⭐ Visual Regression: Check state after clearing completed items | ||
| await expect(page).toHaveScreenshot('after-clear-completed.png'); | ||
| }); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await expect(page).toHaveScreenshot('after-clear-completed.png'); | |
| await expect(page).toHaveScreenshot("after-clear-completed.png"); |
| await expect(page).toHaveScreenshot('after-clear-completed.png'); | ||
| }); | ||
|
|
||
| test('should allow me to un-mark items as complete', async ({ page }) => { |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
| @@ -1,16 +1,62 @@ | |||
| const { defineConfig } = require('@playwright/test'); | |||
| import { defineConfig, devices } from '@playwright/test'; | |||
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| import { defineConfig, devices } from '@playwright/test'; | |
| import { defineConfig, devices } from "@playwright/test"; |
|
|
||
| // Directory for test artifacts (videos, traces, screenshots generated during runs) | ||
| outputDir: 'published-screenshots/test-results', | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| outputDir: 'published-screenshots/test-results', | |
| outputDir: "published-screenshots/test-results", |
| // When you run `npx playwright test --update-snapshots`, images are saved here. | ||
| // When you run `npx playwright test`, images are compared against baselines here. | ||
| snapshotPathTemplate: 'published-screenshots/snapshots/{testFilePath}-{arg}-{projectName}{ext}', | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| snapshotPathTemplate: 'published-screenshots/snapshots/{testFilePath}-{arg}-{projectName}{ext}', | |
| snapshotPathTemplate: | |
| "published-screenshots/snapshots/{testFilePath}-{arg}-{projectName}{ext}", |
| // Reporter to use. 'blob' is good for CI as it produces a single JSON file. | ||
| // The interactive HTML report will be generated in the workflow. | ||
| reporter: 'blob', | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| reporter: 'blob', | |
| reporter: "blob", |
|
|
||
| // Collect trace when retrying the first time. | ||
| trace: 'on-first-retry', | ||
| }, |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| trace: 'on-first-retry', | |
| trace: "on-first-retry", |
| use: { ...devices['Desktop Chrome'] }, | ||
| }, |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| name: 'chromium', | |
| use: { ...devices['Desktop Chrome'] }, | |
| name: "chromium", | |
| use: { ...devices["Desktop Chrome"] }, |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
Playwright Test MetricsTotal: 0 Duration: 0 ms 📊 Playwright Reports\n\n* Full HTML Report: View Report\n* Captured Images/Diffs: Browse Images\n\nThese reports are specific to this Pull Request and are hosted on GitHub Pages.\n # Use the generated markdown for GH Pages linksESLint (GUI tests)Total files scanned: 0 Test-Flow ChartArtifact: test-flow-chart → flowchart.png View Full Reports (Downloadable Artifacts):
Full run details: link |
PBI 2.2 Generate before and after view